import request from "@/utils/request";
import {serialize} from "@web-design/ui";

export const login = (data: any) => {
  return request({
    url: '/user/login',
    method: 'POST',
    // headers:{
    //   'Content-Type':'application/x-www-form-urlencoded'
    // },
    data
    // data:serialize(data)
  })
}
export const queryUserMenuList = (data: any) => {
  return request({
    url: '/user/queryUserMenuList',
    method: 'POST',
    data
  })
}
export const resetUserPassword = (data: any) => {
  return request({
    url: '/user/resetUserPassword',
    method: 'POST',
    data
  })
}
export const queryUserDetail = (data: any) => {
  return request({
    url: '/user/queryUserDetail',
    method: 'POST',
    data
  })
}
export const createUser = (data: any) => {
  return request({
    url: '/user/createUser',
    method: 'POST',
    data
  })
}
export const updateUser = (data: any) => {
  return request({
    url: '/user/updateUser',
    method: 'POST',
    data
  })
}

export const activateUser = (data: any) => {
  return request({
    url: '/user/activateUser',
    method: 'POST',
    data
  })
}
export const deactivateUser = (data: any) => {
  return request({
    url: '/user/deactivateUser',
    method: 'POST',
    data
  })
}
export const queryUserPage = (data: any) => {
  return request({
    url: '/user/queryUserPage',
    method: 'POST',
    data
  })
}
export const queryRolePage = (data: any) => {
  return request({
    url: '/role/queryRolePage',
    method: 'POST',
    data
  })
}
export const updateRole = (data: any) => {
  return request({
    url: '/role/updateRole',
    method: 'POST',
    data
  })
}
export const createRole = (data: any) => {
  return request({
    url: '/role/createRole',
    method: 'POST',
    data
  })
}
export const queryRoleDetail = (data: any) => {
  return request({
    url: '/role/queryRoleDetail',
    method: 'POST',
    data
  })
}
export const updateRoleMenu = (data: any) => {
  return request({
    url: '/role/updateRoleMenu',
    method: 'POST',
    data
  })
}
export const queryAllMenuList = (data: any) => {
  return request({
    url: '/role/queryAllMenuList',
    method: 'POST',
    data
  })
}
export const querySubjectPage = (data: any) => {
  return request({
    url: '/book/querySubjectPage',
    method: 'POST',
    data
  })
}
export const querySubjectLevel = (data: any) => {
  return request({
    url: '/book/querySubjectLevel',
    method: 'POST',
    data
  })
}
export const updateSubject = (data: any) => {
  return request({
    url: '/book/updateSubject',
    method: 'POST',
    data
  })
}
export const querySubjectDetail = (data: any) => {
  return request({
    url: '/book/querySubjectDetail',
    method: 'POST',
    data
  })
}
export const queryBookPage = (data: any) => {
  return request({
    url: '/book/queryBookPage',
    method: 'POST',
    data
  })
}
export const disableBook = (data: any) => {
  return request({
    url: '/book/disableBook',
    method: 'POST',
    data
  })
}
export const updateBook = (data: any) => {
  return request({
    url: '/book/updateBook',
    method: 'POST',
    data
  })
}
export const createBook = (data: any) => {
  return request({
    url: '/book/createBook',
    method: 'POST',
    data
  })
}
export const queryBookDetail = (data: any) => {
  return request({
    url: '/book/queryBookDetail',
    method: 'POST',
    data
  })
}
export const createBookQrCode = (data: any) => {
  return request({
    url: '/book/createBookQrCode',
    method: 'POST',
    data
  })
}
